﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListTechnical.aspx.cs"
    Inherits="dzs.Web.supply.ListTechnical" EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            height: 15px;
        }
    </style>
    <link href="../../css/myStyle.css" rel="stylesheet" />
    <link href="../style.css" type="text/css" rel="stylesheet" />
     <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/JsTools.js" type="text/javascript"></script>
    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">

        function OpenPop(val, w, h) {
            if (true == window.showModalDialog(val, window.self, "dialogwidth=" + w + ";dialogheight=" + h + ";")) {
                __doPostBack('btn_reload', 'btn_reload_Click');
            }

        }

        function checksel() {
            if ($("#<%= GridView1.ClientID %> tr :checkbox:checked").length > 0)
                return true;
            else
            { alert('没有选择任何行！'); return false; }

        }
       
    </script>

     <link href="../../jquery-ui.min.css" rel="stylesheet" />
    <script src="../../js/jquery.js"></script>
    <script src="../../js/jquery-ui.min.js"></script>
     <script type="text/javascript">
         $(function () {
             $("#txt_projectName").autocomplete({
                 minLength: 1, // 设置搜索的关键字最小长度// 设置自动完成列表的函数，函数包括两个参数，requset和response      
                 source: function (request, response) {
                     $.ajax({
                         type: "POST",          // 通过request.term可以获得文本框内容   
                         url: "../../Handler.ashx?keyword=" + request.term,
                         contentType: "application/json; charset=gb2312",
                         dataType: "json",
                         success: function (data) {
                             // jQuery.map(array, callback) :将一个数组中的元素转换到另一个数组中。
                             //  下面就是把数组["value1", "value2",...]转换为[{value:"value1"}, {value:"value2"},...]                 
                             response($.map(data, function (item) {
                                 return { value: item };
                             }));
                         },
                         error: function () {
                             alert("ajax请求失败");
                         }
                     });
                 }
             });
         });
         </script>
</head>
<body style="font-size: 9pt;">
    <form id="form1" runat="server">
    <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
            <td style="height: 15px;">
                &nbsp;
            </td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="height: 15px;">
                <b>技术资料确认列表</b>
            </td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
            </td>
            <td class="style2">
            </td>
        </tr>
        <tr>
            <td style="height: 15px;">
                项目名称：<asp:TextBox ID="txt_projectName" runat="server"></asp:TextBox>
&nbsp; 物料描述：<asp:TextBox ID="txt_material" runat="server"></asp:TextBox>
&nbsp;供货商：<asp:TextBox ID="txt_supplier" runat="server"></asp:TextBox>
&nbsp;<asp:Button ID="btn_sel" runat="server" CssClass="btn" onclick="btn_sel_Click" 
                    Text="查询" />
            </td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="height: 15px;">
                &nbsp;</td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="height: 15px;">
                <asp:Label ID="lbl_count" runat="server"></asp:Label>
            </td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="height: 15px;">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BorderWidth="0px"
                    CellPadding="0" CellSpacing="1" CssClass="gv" GridLines="None" OnRowCommand="GridView1_RowCommand"
                    Width="2200px" AllowPaging="True" 
                    OnPageIndexChanging="GridView1_PageIndexChanging" PageSize="20">
                    <Columns>
                     <asp:TemplateField HeaderText="选择">
                         <HeaderTemplate>
                          <input id="cbo_checkAll" type="checkbox" onclick="checkall(this)" />全选
                    </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="cbo_check" runat="server" />
                                <asp:Label ID="lbl_supplyPlanId" runat="server" Text='<%# Bind("supplyPlanId") %>' Visible="False"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbn_add" runat="server" CommandArgument='<%# Bind("supplyPlanId") %>'
                                    CommandName="lbn_add" ForeColor="Blue">技术资料确认</asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="LinkButton3" runat="server" CommandName="outconfirm" 
                                    ForeColor="Blue">确认函</asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="LinkButton4" runat="server" CommandName="outex" 
                                    ForeColor="Blue">催交函</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                       <asp:BoundField DataField="sname" HeaderText="供应商" />
                        <asp:BoundField DataField="supplyDate" DataFormatString="{0:d}" 
                            HeaderText="供货期" />
                        <asp:BoundField DataField="projectName" HeaderText="项目名称" />
                        <asp:BoundField DataField="proid" HeaderText="项目编号" />
                        <asp:BoundField DataField="material" HeaderText="物料描述" />
                        <asp:BoundField DataField="technicalDataStatus" HeaderText="技术资料确认状态" 
                            Visible="False" />
                        <asp:BoundField DataField="technicalDataStatusDate" HeaderText="技术资料确认日期" 
                            Visible="False" />
                        <asp:BoundField DataField="innums" HeaderText="已入库数量" Visible="False" />
                        <asp:BoundField DataField="num" HeaderText="计划数量" />
                        <asp:BoundField DataField="slink" HeaderText="联系人" />
                        <asp:BoundField DataField="sphone" HeaderText="电话" />
                        <asp:BoundField DataField="sfax" HeaderText="传真" />
                        <asp:BoundField DataField="purchaseid" HeaderText="订单号" />
                        <asp:BoundField DataField="realSupplyDate" DataFormatString="{0:d}" 
                            HeaderText="合同交货日期" />
                          <asp:BoundField DataField="usework" HeaderText="需用单位" />
                        <asp:BoundField DataField="winBid" HeaderText="中标批次" />
                        <asp:BoundField DataField="purchaseid" HeaderText="采购订单号" />
                    </Columns>
                    <PagerStyle CssClass="mypager" />
                </asp:GridView>
            </td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="height: 15px;">
                <asp:Button ID="btn_reload" runat="server" OnClick="btn_reload_Click" Visible="False" />
            </td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="height: 15px;">
                技术资料确认日期：<asp:TextBox ID="txt_technicalDataStatusDate" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"></asp:TextBox>
            &nbsp;<asp:Button ID="btn_confirm" runat="server" CssClass="btn" onclick="btn_confirm_Click" 
                    Text="确认" />
            </td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="height: 15px;">
                &nbsp;
            </td>
            <td style="height: 15px;">
                &nbsp;</td>
        </tr>
    </table>
    </form>
</body>
</html>
